package cn.lin.spring.test;

import cn.lin.spring.test2.ServiceD;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SourceHelper {

    public static void main(String[] args) throws InterruptedException {

        ConfigurableApplicationContext parent = new SpringApplication(SourceHelper.class).run(args);
        SpringApplication application = new SpringApplication(SourceHelper.class);
        ConfigurableApplicationContext ctx = application.run(args);
        ctx.getBean(ServiceA.class).sayByA("hh");
        ctx.getBean(ServiceD.class).sayByD("dd");
        System.out.println("----------------------");

    }

}
